<template>
	<view class="flex-colume-start content mineOrderPage">
		<view @click="itemClick(item)" v-for="(item,index) in dataArr" class="flex-row-start order-item">
			<image class="leftImg" :src="item.goods_info.thumb"></image>
			<view class="flex-colume-start right11">
				<view class="t1">{{item.order_sn}}</view>
				<view class="text-two-line t2">{{item.goods_info.goods_name}}</view>
				<view class="t3">¥<span style="font-size: 32rpx; font-weight: 500;">{{item.total_amount}}</span>
				<!-- <span style="margin-left: 8rpx;">已有{{}}人买下</span> -->
				</view>
				<view class="t4">{{item.order_status_label}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		orderList
	} from '@/api/api'
	import request from '@/api/request'
	export default {
		data() {
			return {
				dataArr:[]
			}
		},
		onLoad(e) {
			this.requestList()
			
		},
		methods: {
			requestList(){
				orderList().then(res=>{
					if (res.code == 200){
						this.dataArr = res.data
					}
				})
			},
			itemClick(item){
				
				uni.navigateTo({
					url:'/pages/mine/orderDetail?id='+item.id
				})
			}

		}
	}
</script>

<style lang="scss">
	.mineOrderPage{
		padding-top: 30rpx;
		.order-item{
			width: 690rpx;
			background-color: white;
			padding: 25rpx;
			border-radius: 16rpx;
			margin-bottom: 20rpx;
			.leftImg{
				width: 160rpx;
				height: 160rpx;
				flex-shrink: 0;
				border-radius: 16rpx;
				margin-right: 20rpx;
			}
			.right11{
				flex: 1;
				position: relative;
				align-items: flex-start;
				height: 160rpx;
				.t1{
					line-height: 32rpx;
					font-size: 28rpx;
					color: rgb(153, 153, 153);
				}
				.t2{
					margin-top: 10rpx;
					font-size: 28rpx;
					color: black;
				}
				.t3{
					position: absolute;
					bottom: 0rpx;
					left: 0rpx;
					font-size: 24rpx;
					color: #C90000;
				}
				
				.t4{
					position: absolute;
					right: 0rpx;
					top: 0rpx;
					font-size: 26rpx;
					line-height: 32rpx;
					font-weight: 450;
					color: #C90000;
					
				}
			}
		}
	}
</style>